<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>项目评级</title>
	<script type="text/javascript" src="/rating/Public/home/js/jquery-1.10.2.min.js"></script>
	<link href="/rating/Public/validform/Validform.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/rating/Public/validform/Validform_v5.3.2.js"></script>
	<script type="text/javascript" src="/rating/Public/validform/Validform_Datatype.js"></script>
</head>
<body>
	<form id="rateform" name="rateform" action="<?php echo U('test/index',array('item_id'=>$iteminfo['item_id']));?>" method="post">
		<?php if(is_array($rateinfo)): $k = 0; $__LIST__ = $rateinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$topcate): $mod = ($k % 2 );++$k; echo ($k); ?>、<?php echo ($topcate["top_name"]); ?><br>
				<?php if(is_array($topcate["subcate"])): $key = 0; $__LIST__ = $topcate["subcate"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subcate): $mod = ($key % 2 );++$key; echo ($subcate["sub_name"]); ?><br>
				<?php if($subcate["sub_type"] == '1' ): ?><!--单选-->
					<?php if(is_array($subcate["threecate"])): $i = 0; $__LIST__ = $subcate["threecate"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$threecate): $mod = ($i % 2 );++$i;?><label><input name="info[<?php echo ($subcate["sub_id"]); ?>]" type="radio" value="<?php echo ($threecate["three_id"]); ?>" datatype="*" errormsg="不能为空！" /><?php echo ($threecate["three_name"]); ?></label><?php endforeach; endif; else: echo "" ;endif; ?>
					<i class="Validform_checktip"></i>
				<?php elseif($subcate["sub_type"] == '2' ): ?><!--多选-->
					<?php if(is_array($subcate["threecate"])): $i = 0; $__LIST__ = $subcate["threecate"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$threecate): $mod = ($i % 2 );++$i;?><label><input name="info[<?php echo ($subcate["sub_id"]); ?>][]" type="checkbox" value="<?php echo ($threecate["three_id"]); ?>" datatype="*" errormsg="不能为空！"/><?php echo ($threecate["three_name"]); ?></label><?php endforeach; endif; else: echo "" ;endif; ?>
					<i class="Validform_checktip"></i>
				<?php elseif($subcate["sub_type"] == '3' ): ?><!--输入填写-->
					<?php if(is_array($subcate["threecate"])): $i = 0; $__LIST__ = $subcate["threecate"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$threecate): $mod = ($i % 2 );++$i; echo ($threecate["three_name"]); ?>:<input name="info[<?php echo ($subcate["sub_id"]); ?>][<?php echo ($threecate["three_id"]); ?>]" type="text" value="" datatype="*" errormsg="不能为空！" /><i class="Validform_checktip"></i><?php endforeach; endif; else: echo "" ;endif; endif; ?>
				<br><?php endforeach; endif; else: echo "" ;endif; ?>
		<br><?php endforeach; endif; else: echo "" ;endif; ?>

		<br>
		<input type="submit" value="登录"/>
	</form>

	<script>
		$(function(){
			$(":text").keyup(function(){
				var v=$(this).val();
				$(this).attr("maxlength",5);
				$(this).val(v.replace(/[^\-?\d.]/g,''));
			});

			$("#rateform").Validform({
				tiptype:1
			});
		}); 
	</script>
</body>
</html>